package com.jichangxiu.system.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jichangxiu.common.entity.po.BaseEntity;
import com.jichangxiu.system.entity.bo.SysTenantMenuBo;
import io.github.linpeilie.annotations.AutoMapper;
import io.github.linpeilie.annotations.AutoMappers;
import lombok.*;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * SysTenantMenu: sys_tenant_menu 租户菜单关联表
 *
 * @author JiChangXiu
 * @create 2024-06-28 13:44:52
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_tenant_menu")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AutoMappers({
        @AutoMapper(target = SysTenantMenuBo.class, reverseConvertGenerate = false)
})
public class SysTenantMenu extends BaseEntity {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 租户ID
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 菜单ID
     */
    @TableField(value = "menu_id")
    private String menuId;

    /**
     * 特征
     */
    @TableField(value = "type")
    private String type;

    /**
     * 菜单开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "start_date")
    private Date startDate;

    /**
     * 菜单到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "end_date")
    private Date endDate;

    /**
     * 是否删除
     */
    @TableLogic
    @TableField(value = "deleted")
    private Long deleted;

}